package org.fisco.bcos.asset.contract;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.fisco.bcos.sdk.abi.FunctionEncoder;
import org.fisco.bcos.sdk.abi.FunctionReturnDecoder;
import org.fisco.bcos.sdk.abi.TypeReference;
import org.fisco.bcos.sdk.abi.datatypes.Address;
import org.fisco.bcos.sdk.abi.datatypes.Bool;
import org.fisco.bcos.sdk.abi.datatypes.DynamicArray;
import org.fisco.bcos.sdk.abi.datatypes.Event;
import org.fisco.bcos.sdk.abi.datatypes.Function;
import org.fisco.bcos.sdk.abi.datatypes.Type;
import org.fisco.bcos.sdk.abi.datatypes.generated.Bytes32;
import org.fisco.bcos.sdk.abi.datatypes.generated.Uint256;
import org.fisco.bcos.sdk.abi.datatypes.generated.Uint8;
import org.fisco.bcos.sdk.abi.datatypes.generated.tuples.generated.Tuple1;
import org.fisco.bcos.sdk.abi.datatypes.generated.tuples.generated.Tuple2;
import org.fisco.bcos.sdk.abi.datatypes.generated.tuples.generated.Tuple4;
import org.fisco.bcos.sdk.abi.datatypes.generated.tuples.generated.Tuple5;
import org.fisco.bcos.sdk.client.Client;
import org.fisco.bcos.sdk.contract.Contract;
import org.fisco.bcos.sdk.crypto.CryptoSuite;
import org.fisco.bcos.sdk.crypto.keypair.CryptoKeyPair;
import org.fisco.bcos.sdk.eventsub.EventCallback;
import org.fisco.bcos.sdk.model.CryptoType;
import org.fisco.bcos.sdk.model.TransactionReceipt;
import org.fisco.bcos.sdk.model.callback.TransactionCallback;
import org.fisco.bcos.sdk.transaction.model.exception.ContractException;

@SuppressWarnings("unchecked")
public class EvidenceController extends Contract {
    public static final String[] BINARY_ARRAY = {"608060405234801561001057600080fd5b50604051612be3380380612be383398101806040528101908080519060200190929190805182019291905050508181610047610167565b808360ff1660ff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015610093578082015181840152602081019050610078565b505050509050019350505050604051809103906000f0801580156100bb573d6000803e3d6000fd5b506000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610103610177565b604051809103906000f08015801561011f573d6000803e3d6000fd5b50600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050610187565b60405161124a8061104383390190565b6040516109568061228d83390190565b610ead806101966000396000f300608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632a00a4721461007d5780634a7221a01461015f578063553fec841461022e5780636599c629146102855780637bc7eabe146102dc578063ab9beda714610350575b600080fd5b34801561008957600080fd5b506100ac6004803603810190808035600019169060200190929190505050610399565b6040518086600019166000191681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018460ff1660ff1681526020018360ff1660ff168152602001828103825285818151815260200191508051906020019060200280838360005b8381101561014757808201518184015260208101905061012c565b50505050905001965050505050505060405180910390f35b34801561016b57600080fd5b5061018e6004803603810190808035600019169060200190929190505050610508565b6040518085600019166000191681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156102175780820151818401526020810190506101fc565b505050509050019550505050505060405180910390f35b34801561023a57600080fd5b50610243610666565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561029157600080fd5b5061029a61068b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102e857600080fd5b5061034e6004803603810190808035600019169060200190929190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192905050506106b1565b005b34801561035c57600080fd5b5061037f60048036038101908080356000191690602001909291905050506108cc565b604051808215151515815260200191505060405180910390f35b60008060606000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632a00a472876040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050600060405180830381600087803b15801561043957600080fd5b505af115801561044d573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060a081101561047757600080fd5b81019080805190602001909291908051906020019092919080516401000000008111156104a357600080fd5b828101905060208101848111156104b957600080fd5b81518560208202830111640100000000821117156104d657600080fd5b505092919060200180519060200190929190805190602001909291905050509450945094509450945091939590929450565b60008060006060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166354f6127f866040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050600060405180830381600087803b1580156105a857600080fd5b505af11580156105bc573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060808110156105e657600080fd5b81019080805190602001909291908051906020019092919080519060200190929190805164010000000081111561061c57600080fd5b8281019050602081018481111561063257600080fd5b815185602082028301116401000000008211171561064f57600080fd5b505092919050505093509350935093509193509193565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b816000600102816000191614151515610732576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4e6f742076616c6964206861736800000000000000000000000000000000000081525060200191505060405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636aa73a1d8433856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600019166000191681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015610820578082015181840152602081019050610805565b50505050905001945050505050600060405180830381600087803b15801561084757600080fd5b505af115801561085b573d6000803e3d6000fd5b5050505082600019167fdb373e23c80fd5e0d6f3b5f2f2d7655b1d6a43dbc994b4b2a22a79fc43215c9833604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a2505050565b6000806000806060600080600088600060010281600019161415151561095a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4e6f742076616c6964206861736800000000000000000000000000000000000081525060200191505060405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166398ced6988b336040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600019166000191681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b158015610a2657600080fd5b505af1158015610a3a573d6000803e3d6000fd5b505050506040513d6020811015610a5057600080fd5b81019080805190602001909291905050509750871515610a735760009850610e74565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632a00a4728b6040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050600060405180830381600087803b158015610b0b57600080fd5b505af1158015610b1f573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060a0811015610b4957600080fd5b8101908080519060200190929190805190602001909291908051640100000000811115610b7557600080fd5b82810190506020810184811115610b8b57600080fd5b8151856020820283011164010000000082111715610ba857600080fd5b50509291906020018051906020019092919080519060200190929190505050965096509650965096508260ff168460ff161015915089600019167f7de792f4f93151f26fa1efc66f5994177cf57eb261db8ffb111079133da7206c3384604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a28115610e6f57600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aa4bf6d28b8842896040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018085600019166000191681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015610d4d578082015181840152602081019050610d32565b5050505090500195505050505050600060405180830381600087803b158015610d7557600080fd5b505af1158015610d89573d6000803e3d6000fd5b505050506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631e95c2ce8b6040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050600060405180830381600087803b158015610e2557600080fd5b505af1158015610e39573d6000803e3d6000fd5b5050505089600019167f847e1916a0633fa80487490116711063e81e138e6959147ead6509341507d20e604051604051","80910390a25b600198505b50505050505050509190505600a165627a7a72305820a62b55cc890a9e59f01062cd6dab852a4a8d9a99f6f6e8bfc435d6fce2d709b10029608060405234801561001057600080fd5b5060405161124a38038061124a83398101806040528101908080519060200190929190805182019291905050506000336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600260006101000a81548160ff021916908360ff160217905550600090505b81518110156101245760016004600084848151811015156100bc57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808060010191505061009f565b505050611114806101366000396000f30060806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631e95c2ce146100935780632a00a472146100c45780636aa73a1d146101a65780637f3c81601461023a57806398ced6981461026b5780639c52a7f1146102d4578063b2bdfa7b14610317578063ff9913e81461036e575b600080fd5b34801561009f57600080fd5b506100c260048036038101908080356000191690602001909291905050506103b1565b005b3480156100d057600080fd5b506100f360048036038101908080356000191690602001909291905050506105e1565b6040518086600019166000191681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018460ff1660ff1681526020018360ff1660ff168152602001828103825285818151815260200191508051906020019060200280838360005b8381101561018e578082015181840152602081019050610173565b50505050905001965050505050505060405180910390f35b3480156101b257600080fd5b506102386004803603810190808035600019169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929050505061075b565b005b34801561024657600080fd5b5061024f6109d3565b604051808260ff1660ff16815260200191505060405180910390f35b34801561027757600080fd5b506102ba6004803603810190808035600019169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109e6565b604051808215151515815260200191505060405180910390f35b3480156102e057600080fd5b50610315600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ded565b005b34801561032357600080fd5b5061032c610f0c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561037a57600080fd5b506103af600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f31565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061045c575060011515600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b15156104d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4e6f742061757468656e7469636174656400000000000000000000000000000081525060200191505060405180910390fd5b8060001916600360008360001916600019168152602001908152602001600020600001546000191614151561056d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f72657175657374206e6f7420666f756e6400000000000000000000000000000081525060200191505060405180910390fd5b6003600082600019166000191681526020019081526020016000206000808201600090556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160146101000a81549060ff02191690556002820160006105dc919061104f565b505050565b600080606060008060006003600088600019166000191681526020019081526020016000209050866000191660036000896000191660001916815260200190815260200160002060000154600019161415156106a5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f72657175657374206e6f7420666f756e6400000000000000000000000000000081525060200191505060405180910390fd5b868160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826002018360010160149054906101000a900460ff16600260009054906101000a900460ff168280548060200260200160405190810160405280929190818152602001828054801561074057602002820191906000526020600020905b81546000191681526020019060010190808311610728575b50505050509250955095509550955095505091939590929450565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610806575060011515600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b151561087a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4e6f742061757468656e7469636174656400000000000000000000000000000081525060200191505060405180910390fd5b60006001026003600085600019166000191681526020019081526020016000206000015460001916141515610917576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f7265717565737420616c7265616479206578697374656400000000000000000081525060200191505060405180910390fd5b8260036000856000191660001916815260200190815260200160002060000181600019169055508160036000856000191660001916815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060036000856000191660001916815260200190815260200160002060020190805190602001906109cd929190611070565b50505050565b600260009054906101000a900460ff1681565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610a94575060011515600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b1515610b08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4e6f742061757468656e7469636174656400000000000000000000000000000081525060200191505060405180910390fd5b60011515600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515141515610bd0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f4e6f7420616c6c6f77656420746f20766f74650000000000000000000000000081525060200191505060405180910390fd5b83600019166003600086600019166000191681526020019081526020016000206000015460001916141515610c6d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f72657175657374206e6f7420666f756e6400000000000000000000000000000081525060200191505060405180910390fd5b6003600085600019166000191681526020019081526020016000209050600015158160030160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515141515610d54576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f566f74657220616c726561647920766f7465640000000000000000000000000081525060200191505060405180910390fd5b60018160030160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080600101601481819054906101000a900460ff168092919060010191906101000a81548160ff021916908360ff16021790555050600191505092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610eb1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f4e6f742061646d","696e000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ff5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f4e6f742061646d696e000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b508054600082559060005260206000209081019061106d91906110c3565b50565b8280548282559060005260206000209081019282156110b2579160200282015b828111156110b1578251829060001916905591602001919060010190611090565b5b5090506110bf91906110c3565b5090565b6110e591905b808211156110e15760008160009055506001016110c9565b5090565b905600a165627a7a72305820b97cd7138322f7f47bdde4b10d8d31e26df1b0434e8b81aa16d6985ec1e74fd200296080604052336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610903806100536000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806354f6127f146100725780639c52a7f114610141578063aa4bf6d214610184578063b2bdfa7b14610222578063ff9913e814610279575b600080fd5b34801561007e57600080fd5b506100a160048036038101908080356000191690602001909291905050506102bc565b6040518085600019166000191681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019060200280838360005b8381101561012a57808201518184015260208101905061010f565b505050509050019550505050505060405180910390f35b34801561014d57600080fd5b50610182600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103fe565b005b34801561019057600080fd5b506102206004803603810190808035600019169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929050505061051d565b005b34801561022e57600080fd5b5061023761071c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028557600080fd5b506102ba600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610741565b005b60008060006060600060026000876000191660001916815260200190815260200160002090508560001916816000015460001916141515610365576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f45766964656e6365206e6f74206578697374000000000000000000000000000081525060200191505060405180910390fd5b80600001548160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826002015483600301808054806020026020016040519081016040528092919081815260200182805480156103e757602002820191906000526020600020905b815460001916815260200190600101908083116103cf575b505050505090509450945094509450509193509193565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156104c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f4e6f742061646d696e000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806105c8575060011515600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b151561063c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4e6f742061757468656e7469636174656400000000000000000000000000000081525060200191505060405180910390fd5b8360026000866000191660001916815260200190815260200160002060000181600019169055508260026000866000191660001916815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550816002600086600019166000191681526020019081526020016000206002018190555080600260008660001916600019168152602001908152602001600020600301908051906020019061071592919061085f565b5050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610805576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f4e6f742061646d696e000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b8280548282559060005260206000209081019282156108a1579160200282015b828111156108a057825182906000191690559160200191906001019061087f565b5b5090506108ae91906108b2565b5090565b6108d491905b808211156108d05760008160009055506001016108b8565b5090565b905600a165627a7a723058205d292f82170e1800244b3e411d6ccb2f30cbb266f76532903b2f1842a69e9cf90029"};

    public static final String BINARY = org.fisco.bcos.sdk.utils.StringUtils.joinAll("", BINARY_ARRAY);

    public static final String[] SM_BINARY_ARRAY = {"608060405234801561001057600080fd5b50604051612be3380380612be383398101806040528101908080519060200190929190805182019291905050508181610047610167565b808360ff1660ff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015610093578082015181840152602081019050610078565b505050509050019350505050604051809103906000f0801580156100bb573d6000803e3d6000fd5b506000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610103610177565b604051809103906000f08015801561011f573d6000803e3d6000fd5b50600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050610187565b60405161124a8061104383390190565b6040516109568061228d83390190565b610ead806101966000396000f300608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635586865f1461007d578063766ecc04146100d457806389b3ecda146101b6578063abb62242146101ff578063c503a9e214610273578063c898ba86146102ca575b600080fd5b34801561008957600080fd5b50610092610399565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100e057600080fd5b5061010360048036038101908080356000191690602001909291905050506103be565b6040518086600019166000191681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018460ff1660ff1681526020018360ff1660ff168152602001828103825285818151815260200191508051906020019060200280838360005b8381101561019e578082015181840152602081019050610183565b50505050905001965050505050505060405180910390f35b3480156101c257600080fd5b506101e5600480360381019080803560001916906020019092919050505061052d565b604051808215151515815260200191505060405180910390f35b34801561020b57600080fd5b50610271600480360381019080803560001916906020019092919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050610ae2565b005b34801561027f57600080fd5b50610288610cfd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102d657600080fd5b506102f96004803603810190808035600019169060200190929190505050610d23565b6040518085600019166000191681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015610382578082015181840152602081019050610367565b505050509050019550505050505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060606000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663766ecc04876040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050600060405180830381600087803b15801561045e57600080fd5b505af1158015610472573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060a081101561049c57600080fd5b81019080805190602001909291908051906020019092919080516401000000008111156104c857600080fd5b828101905060208101848111156104de57600080fd5b81518560208202830111640100000000821117156104fb57600080fd5b505092919060200180519060200190929190805190602001909291905050509450945094509450945091939590929450565b600080600080606060008060008860006001028160001916141515156105bb576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4e6f742076616c6964206861736800000000000000000000000000000000000081525060200191505060405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166365425e2e8b336040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600019166000191681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561068757600080fd5b505af115801561069b573d6000803e3d6000fd5b505050506040513d60208110156106b157600080fd5b810190808051906020019092919050505097508715156106d45760009850610ad5565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663766ecc048b6040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050600060405180830381600087803b15801561076c57600080fd5b505af1158015610780573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060a08110156107aa57600080fd5b81019080805190602001909291908051906020019092919080516401000000008111156107d657600080fd5b828101905060208101848111156107ec57600080fd5b815185602082028301116401000000008211171561080957600080fd5b50509291906020018051906020019092919080519060200190929190505050965096509650965096508260ff168460ff161015915089600019167fdb4c60250992c128f17ca11b77d1d1d26aae0881d73ebdf1af9f8ce05c81df633384604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a28115610ad057600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d134eb038b8842896040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018085600019166000191681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156109ae578082015181840152602081019050610993565b5050505090500195505050505050600060405180830381600087803b1580156109d657600080fd5b505af11580156109ea573d6000803e3d6000fd5b505050506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638f5c11068b6040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050600060405180830381600087803b158015610a8657600080fd5b505af1158015610a9a573d6000803e3d6000fd5b5050505089600019167fc044db98fe8ab1805af0ea004883d0bd1578810fc486ac612e2e69460089fafe60405160405180910390a25b600198505b5050505050505050919050565b816000600102816000191614151515610b63576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f4e6f742076616c6964206861736800000000000000000000000000000000000081525060200191505060405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630ada1c948433856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600019166000191681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015610c51578082015181840152602081019050610c36565b50505050905001945050505050600060405180830381600087803b158015610c7857600080fd5b505af1158015610c8c573d6000803e3d6000fd5b5050505082600019167f1cc1eec73c1243d1432064e21f51adf592bc0be1f0a88fabac5f280081e90d8333604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a2505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060006060600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cad1a469866040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050600060405180830381600087803b158015610dc357600080fd5b505af1158015610dd7573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506080811015610e0157600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051640100000000811115610e3757600080fd5b82810190506020810184811115610e4d57600080fd5b8151856020820283011164010000000082111715610e6a57600080fd","5b5050929190505050935093509350935091935091935600a165627a7a723058201e052d2dcda1578524ab28fde0b50fe5d829c520af0c8e2401b90216b84009e20029608060405234801561001057600080fd5b5060405161124a38038061124a83398101806040528101908080519060200190929190805182019291905050506000336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600260006101000a81548160ff021916908360ff160217905550600090505b81518110156101245760016004600084848151811015156100bc57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808060010191505061009f565b505050611114806101366000396000f30060806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630ada1c941461009357806328e914891461012757806356bea0001461017e57806365425e2e146101c1578063766ecc041461022a5780638f2160971461030c5780638f5c11061461033d578063da89dd381461036e575b600080fd5b34801561009f57600080fd5b506101256004803603810190808035600019169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192905050506103b1565b005b34801561013357600080fd5b5061013c610629565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561018a57600080fd5b506101bf600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061064e565b005b3480156101cd57600080fd5b506102106004803603810190808035600019169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061076d565b604051808215151515815260200191505060405180910390f35b34801561023657600080fd5b506102596004803603810190808035600019169060200190929190505050610b74565b6040518086600019166000191681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018460ff1660ff1681526020018360ff1660ff168152602001828103825285818151815260200191508051906020019060200280838360005b838110156102f45780820151818401526020810190506102d9565b50505050905001965050505050505060405180910390f35b34801561031857600080fd5b50610321610cee565b604051808260ff1660ff16815260200191505060405180910390f35b34801561034957600080fd5b5061036c6004803603810190808035600019169060200190929190505050610d01565b005b34801561037a57600080fd5b506103af600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f31565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061045c575060011515600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b15156104d0576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4e6f742061757468656e7469636174656400000000000000000000000000000081525060200191505060405180910390fd5b6000600102600360008560001916600019168152602001908152602001600020600001546000191614151561056d576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f7265717565737420616c7265616479206578697374656400000000000000000081525060200191505060405180910390fd5b8260036000856000191660001916815260200190815260200160002060000181600019169055508160036000856000191660001916815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360008560001916600019168152602001908152602001600020600201908051906020019061062392919061104f565b50505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610712576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f4e6f742061646d696e000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061081b575060011515600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b151561088f576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4e6f742061757468656e7469636174656400000000000000000000000000000081525060200191505060405180910390fd5b60011515600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515141515610957576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f4e6f7420616c6c6f77656420746f20766f74650000000000000000000000000081525060200191505060405180910390fd5b836000191660036000866000191660001916815260200190815260200160002060000154600019161415156109f4576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f72657175657374206e6f7420666f756e6400000000000000000000000000000081525060200191505060405180910390fd5b6003600085600019166000191681526020019081526020016000209050600015158160030160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515141515610adb576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f566f74657220616c726561647920766f7465640000000000000000000000000081525060200191505060405180910390fd5b60018160030160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080600101601481819054906101000a900460ff168092919060010191906101000a81548160ff021916908360ff16021790555050600191505092915050565b60008060606000806000600360008860001916600019168152602001908152602001600020905086600019166003600089600019166000191681526020019081526020016000206000015460001916141515610c38576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f72657175657374206e6f7420666f756e6400000000000000000000000000000081525060200191505060405180910390fd5b868160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826002018360010160149054906101000a900460ff16600260009054906101000a900460ff1682805480602002602001604051908101604052809291908181526020018280548015610cd357602002820191906000526020600020905b81546000191681526020019060010190808311610cbb575b50505050509250955095509550955095505091939590929450565b600260009054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610dac575060011515600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b1515610e20576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4e6f742061757468656e7469636174656400000000000000000000000000000081525060200191505060405180910390fd5b80600019166003600083600019166000191681526020019081526020016000206000015460001916141515610ebd576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152","602001807f72657175657374206e6f7420666f756e6400000000000000000000000000000081525060200191505060405180910390fd5b6003600082600019166000191681526020019081526020016000206000808201600090556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160146101000a81549060ff0219169055600282016000610f2c91906110a2565b505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ff5576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f4e6f742061646d696e000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b828054828255906000526020600020908101928215611091579160200282015b8281111561109057825182906000191690559160200191906001019061106f565b5b50905061109e91906110c3565b5090565b50805460008255906000526020600020908101906110c091906110c3565b50565b6110e591905b808211156110e15760008160009055506001016110c9565b5090565b905600a165627a7a72305820d295e8a032131bf7a8cd94690bdf8a7afb9fd0a05f240e2f45fd779af38fcc5f00296080604052336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610903806100536000396000f30060806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806328e914891461007257806356bea000146100c9578063cad1a4691461010c578063d134eb03146101db578063da89dd3814610279575b600080fd5b34801561007e57600080fd5b506100876102bc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100d557600080fd5b5061010a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506102e1565b005b34801561011857600080fd5b5061013b6004803603810190808035600019169060200190929190505050610400565b6040518085600019166000191681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156101c45780820151818401526020810190506101a9565b505050509050019550505050505060405180910390f35b3480156101e757600080fd5b506102776004803603810190808035600019169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050610542565b005b34801561028557600080fd5b506102ba600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610741565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156103a5576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f4e6f742061646d696e000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600080600060606000600260008760001916600019168152602001908152602001600020905085600019168160000154600019161415156104a9576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f45766964656e6365206e6f74206578697374000000000000000000000000000081525060200191505060405180910390fd5b80600001548160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168260020154836003018080548060200260200160405190810160405280929190818152602001828054801561052b57602002820191906000526020600020905b81546000191681526020019060010190808311610513575b505050505090509450945094509450509193509193565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806105ed575060011515600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b1515610661576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4e6f742061757468656e7469636174656400000000000000000000000000000081525060200191505060405180910390fd5b8360026000866000191660001916815260200190815260200160002060000181600019169055508260026000866000191660001916815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550816002600086600019166000191681526020019081526020016000206002018190555080600260008660001916600019168152602001908152602001600020600301908051906020019061073a92919061085f565b5050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610805576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f4e6f742061646d696e000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b8280548282559060005260206000209081019282156108a1579160200282015b828111156108a057825182906000191690559160200191906001019061087f565b5b5090506108ae91906108b2565b5090565b6108d491905b808211156108d05760008160009055506001016108b8565b5090565b905600a165627a7a7230582067ce094c8250d089b29ef069bf4ece17a19eb70adc27d2f05d58d382e7f002cb0029"};

    public static final String SM_BINARY = org.fisco.bcos.sdk.utils.StringUtils.joinAll("", SM_BINARY_ARRAY);

    public static final String[] ABI_ARRAY = {"[{\"constant\":true,\"inputs\":[{\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"getRequestData\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"},{\"name\":\"creator\",\"type\":\"address\"},{\"name\":\"ext\",\"type\":\"bytes32[]\"},{\"name\":\"voted\",\"type\":\"uint8\"},{\"name\":\"threshold\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"getEvidence\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"},{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"bytes32[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"_requestRepo\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"_evidenceRepo\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"hash\",\"type\":\"bytes32\"},{\"name\":\"ext\",\"type\":\"bytes32[]\"}],\"name\":\"createSaveRequest\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"voteSaveRequest\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"threshold\",\"type\":\"uint8\"},{\"name\":\"voterArray\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"creator\",\"type\":\"address\"}],\"name\":\"CreateSaveRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"complete\",\"type\":\"bool\"}],\"name\":\"VoteSaveRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"EvidenceSaved\",\"type\":\"event\"}]"};

    public static final String ABI = org.fisco.bcos.sdk.utils.StringUtils.joinAll("", ABI_ARRAY);

    public static final String FUNC_GETREQUESTDATA = "getRequestData";

    public static final String FUNC_GETEVIDENCE = "getEvidence";

    public static final String FUNC__REQUESTREPO = "_requestRepo";

    public static final String FUNC__EVIDENCEREPO = "_evidenceRepo";

    public static final String FUNC_CREATESAVEREQUEST = "createSaveRequest";

    public static final String FUNC_VOTESAVEREQUEST = "voteSaveRequest";

    public static final Event CREATESAVEREQUEST_EVENT = new Event("CreateSaveRequest", 
            Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>(true) {}, new TypeReference<Address>() {}));
    ;

    public static final Event VOTESAVEREQUEST_EVENT = new Event("VoteSaveRequest", 
            Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>(true) {}, new TypeReference<Address>() {}, new TypeReference<Bool>() {}));
    ;

    public static final Event EVIDENCESAVED_EVENT = new Event("EvidenceSaved", 
            Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>(true) {}));
    ;

    protected EvidenceController(String contractAddress, Client client, CryptoKeyPair credential) {
        super(getBinary(client.getCryptoSuite()), contractAddress, client, credential);
    }

    public static String getBinary(CryptoSuite cryptoSuite) {
        return (cryptoSuite.getCryptoTypeConfig() == CryptoType.ECDSA_TYPE ? BINARY : SM_BINARY);
    }

    public Tuple5<byte[], String, List<byte[]>, BigInteger, BigInteger> getRequestData(byte[] hash) throws ContractException {
        final Function function = new Function(FUNC_GETREQUESTDATA, 
                Arrays.<Type>asList(new org.fisco.bcos.sdk.abi.datatypes.generated.Bytes32(hash)), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>() {}, new TypeReference<Address>() {}, new TypeReference<DynamicArray<Bytes32>>() {}, new TypeReference<Uint8>() {}, new TypeReference<Uint8>() {}));
        List<Type> results = executeCallWithMultipleValueReturn(function);
        return new Tuple5<byte[], String, List<byte[]>, BigInteger, BigInteger>(
                (byte[]) results.get(0).getValue(), 
                (String) results.get(1).getValue(), 
                convertToNative((List<Bytes32>) results.get(2).getValue()), 
                (BigInteger) results.get(3).getValue(), 
                (BigInteger) results.get(4).getValue());
    }

    public Tuple4<byte[], String, BigInteger, List<byte[]>> getEvidence(byte[] hash) throws ContractException {
        final Function function = new Function(FUNC_GETEVIDENCE, 
                Arrays.<Type>asList(new org.fisco.bcos.sdk.abi.datatypes.generated.Bytes32(hash)), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>() {}, new TypeReference<Address>() {}, new TypeReference<Uint256>() {}, new TypeReference<DynamicArray<Bytes32>>() {}));
        List<Type> results = executeCallWithMultipleValueReturn(function);
        return new Tuple4<byte[], String, BigInteger, List<byte[]>>(
                (byte[]) results.get(0).getValue(), 
                (String) results.get(1).getValue(), 
                (BigInteger) results.get(2).getValue(), 
                convertToNative((List<Bytes32>) results.get(3).getValue()));
    }

    public String _requestRepo() throws ContractException {
        final Function function = new Function(FUNC__REQUESTREPO, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}));
        return executeCallWithSingleValueReturn(function, String.class);
    }

    public String _evidenceRepo() throws ContractException {
        final Function function = new Function(FUNC__EVIDENCEREPO, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}));
        return executeCallWithSingleValueReturn(function, String.class);
    }

    public TransactionReceipt createSaveRequest(byte[] hash, List<byte[]> ext) {
        final Function function = new Function(
                FUNC_CREATESAVEREQUEST, 
                Arrays.<Type>asList(new org.fisco.bcos.sdk.abi.datatypes.generated.Bytes32(hash), 
                ext.isEmpty()?org.fisco.bcos.sdk.abi.datatypes.DynamicArray.empty("bytes32[]"):new org.fisco.bcos.sdk.abi.datatypes.DynamicArray<org.fisco.bcos.sdk.abi.datatypes.generated.Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(ext, org.fisco.bcos.sdk.abi.datatypes.generated.Bytes32.class))), 
                Collections.<TypeReference<?>>emptyList());
        return executeTransaction(function);
    }

    public byte[] createSaveRequest(byte[] hash, List<byte[]> ext, TransactionCallback callback) {
        final Function function = new Function(
                FUNC_CREATESAVEREQUEST, 
                Arrays.<Type>asList(new org.fisco.bcos.sdk.abi.datatypes.generated.Bytes32(hash), 
                ext.isEmpty()?org.fisco.bcos.sdk.abi.datatypes.DynamicArray.empty("bytes32[]"):new org.fisco.bcos.sdk.abi.datatypes.DynamicArray<org.fisco.bcos.sdk.abi.datatypes.generated.Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(ext, org.fisco.bcos.sdk.abi.datatypes.generated.Bytes32.class))), 
                Collections.<TypeReference<?>>emptyList());
        return asyncExecuteTransaction(function, callback);
    }

    public String getSignedTransactionForCreateSaveRequest(byte[] hash, List<byte[]> ext) {
        final Function function = new Function(
                FUNC_CREATESAVEREQUEST, 
                Arrays.<Type>asList(new org.fisco.bcos.sdk.abi.datatypes.generated.Bytes32(hash), 
                ext.isEmpty()?org.fisco.bcos.sdk.abi.datatypes.DynamicArray.empty("bytes32[]"):new org.fisco.bcos.sdk.abi.datatypes.DynamicArray<org.fisco.bcos.sdk.abi.datatypes.generated.Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(ext, org.fisco.bcos.sdk.abi.datatypes.generated.Bytes32.class))), 
                Collections.<TypeReference<?>>emptyList());
        return createSignedTransaction(function);
    }

    public Tuple2<byte[], List<byte[]>> getCreateSaveRequestInput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getInput().substring(10);
        final Function function = new Function(FUNC_CREATESAVEREQUEST, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>() {}, new TypeReference<DynamicArray<Bytes32>>() {}));
        List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple2<byte[], List<byte[]>>(

                (byte[]) results.get(0).getValue(), 
                convertToNative((List<Bytes32>) results.get(1).getValue())
                );
    }

    public TransactionReceipt voteSaveRequest(byte[] hash) {
        final Function function = new Function(
                FUNC_VOTESAVEREQUEST, 
                Arrays.<Type>asList(new org.fisco.bcos.sdk.abi.datatypes.generated.Bytes32(hash)), 
                Collections.<TypeReference<?>>emptyList());
        return executeTransaction(function);
    }

    public byte[] voteSaveRequest(byte[] hash, TransactionCallback callback) {
        final Function function = new Function(
                FUNC_VOTESAVEREQUEST, 
                Arrays.<Type>asList(new org.fisco.bcos.sdk.abi.datatypes.generated.Bytes32(hash)), 
                Collections.<TypeReference<?>>emptyList());
        return asyncExecuteTransaction(function, callback);
    }

    public String getSignedTransactionForVoteSaveRequest(byte[] hash) {
        final Function function = new Function(
                FUNC_VOTESAVEREQUEST, 
                Arrays.<Type>asList(new org.fisco.bcos.sdk.abi.datatypes.generated.Bytes32(hash)), 
                Collections.<TypeReference<?>>emptyList());
        return createSignedTransaction(function);
    }

    public Tuple1<byte[]> getVoteSaveRequestInput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getInput().substring(10);
        final Function function = new Function(FUNC_VOTESAVEREQUEST, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>() {}));
        List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple1<byte[]>(

                (byte[]) results.get(0).getValue()
                );
    }

    public Tuple1<Boolean> getVoteSaveRequestOutput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getOutput();
        final Function function = new Function(FUNC_VOTESAVEREQUEST, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {}));
        List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple1<Boolean>(

                (Boolean) results.get(0).getValue()
                );
    }

    public List<CreateSaveRequestEventResponse> getCreateSaveRequestEvents(TransactionReceipt transactionReceipt) {
        List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(CREATESAVEREQUEST_EVENT, transactionReceipt);
        ArrayList<CreateSaveRequestEventResponse> responses = new ArrayList<CreateSaveRequestEventResponse>(valueList.size());
        for (Contract.EventValuesWithLog eventValues : valueList) {
            CreateSaveRequestEventResponse typedResponse = new CreateSaveRequestEventResponse();
            typedResponse.log = eventValues.getLog();
            typedResponse.hash = (byte[]) eventValues.getIndexedValues().get(0).getValue();
            typedResponse.creator = (String) eventValues.getNonIndexedValues().get(0).getValue();
            responses.add(typedResponse);
        }
        return responses;
    }

    public void subscribeCreateSaveRequestEvent(String fromBlock, String toBlock, List<String> otherTopics, EventCallback callback) {
        String topic0 = eventEncoder.encode(CREATESAVEREQUEST_EVENT);
        subscribeEvent(ABI,BINARY,topic0,fromBlock,toBlock,otherTopics,callback);
    }

    public void subscribeCreateSaveRequestEvent(EventCallback callback) {
        String topic0 = eventEncoder.encode(CREATESAVEREQUEST_EVENT);
        subscribeEvent(ABI,BINARY,topic0,callback);
    }

    public List<VoteSaveRequestEventResponse> getVoteSaveRequestEvents(TransactionReceipt transactionReceipt) {
        List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(VOTESAVEREQUEST_EVENT, transactionReceipt);
        ArrayList<VoteSaveRequestEventResponse> responses = new ArrayList<VoteSaveRequestEventResponse>(valueList.size());
        for (Contract.EventValuesWithLog eventValues : valueList) {
            VoteSaveRequestEventResponse typedResponse = new VoteSaveRequestEventResponse();
            typedResponse.log = eventValues.getLog();
            typedResponse.hash = (byte[]) eventValues.getIndexedValues().get(0).getValue();
            typedResponse.voter = (String) eventValues.getNonIndexedValues().get(0).getValue();
            typedResponse.complete = (Boolean) eventValues.getNonIndexedValues().get(1).getValue();
            responses.add(typedResponse);
        }
        return responses;
    }

    public void subscribeVoteSaveRequestEvent(String fromBlock, String toBlock, List<String> otherTopics, EventCallback callback) {
        String topic0 = eventEncoder.encode(VOTESAVEREQUEST_EVENT);
        subscribeEvent(ABI,BINARY,topic0,fromBlock,toBlock,otherTopics,callback);
    }

    public void subscribeVoteSaveRequestEvent(EventCallback callback) {
        String topic0 = eventEncoder.encode(VOTESAVEREQUEST_EVENT);
        subscribeEvent(ABI,BINARY,topic0,callback);
    }

    public List<EvidenceSavedEventResponse> getEvidenceSavedEvents(TransactionReceipt transactionReceipt) {
        List<Contract.EventValuesWithLog> valueList = extractEventParametersWithLog(EVIDENCESAVED_EVENT, transactionReceipt);
        ArrayList<EvidenceSavedEventResponse> responses = new ArrayList<EvidenceSavedEventResponse>(valueList.size());
        for (Contract.EventValuesWithLog eventValues : valueList) {
            EvidenceSavedEventResponse typedResponse = new EvidenceSavedEventResponse();
            typedResponse.log = eventValues.getLog();
            typedResponse.hash = (byte[]) eventValues.getIndexedValues().get(0).getValue();
            responses.add(typedResponse);
        }
        return responses;
    }

    public void subscribeEvidenceSavedEvent(String fromBlock, String toBlock, List<String> otherTopics, EventCallback callback) {
        String topic0 = eventEncoder.encode(EVIDENCESAVED_EVENT);
        subscribeEvent(ABI,BINARY,topic0,fromBlock,toBlock,otherTopics,callback);
    }

    public void subscribeEvidenceSavedEvent(EventCallback callback) {
        String topic0 = eventEncoder.encode(EVIDENCESAVED_EVENT);
        subscribeEvent(ABI,BINARY,topic0,callback);
    }

    public static EvidenceController load(String contractAddress, Client client, CryptoKeyPair credential) {
        return new EvidenceController(contractAddress, client, credential);
    }

    public static EvidenceController deploy(Client client, CryptoKeyPair credential, BigInteger threshold, List<String> voterArray) throws ContractException {
        String encodedConstructor = FunctionEncoder.encodeConstructor(Arrays.<Type>asList(new org.fisco.bcos.sdk.abi.datatypes.generated.Uint8(threshold), 
                voterArray.isEmpty()?org.fisco.bcos.sdk.abi.datatypes.DynamicArray.empty("address[]"):new org.fisco.bcos.sdk.abi.datatypes.DynamicArray<org.fisco.bcos.sdk.abi.datatypes.Address>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(voterArray, org.fisco.bcos.sdk.abi.datatypes.Address.class))));
        return deploy(EvidenceController.class, client, credential, getBinary(client.getCryptoSuite()), encodedConstructor);
    }

    public static class CreateSaveRequestEventResponse {
        public TransactionReceipt.Logs log;

        public byte[] hash;

        public String creator;
    }

    public static class VoteSaveRequestEventResponse {
        public TransactionReceipt.Logs log;

        public byte[] hash;

        public String voter;

        public Boolean complete;
    }

    public static class EvidenceSavedEventResponse {
        public TransactionReceipt.Logs log;

        public byte[] hash;
    }
}
